/*!
 *  \file       RealNumber.cpp
 *  \brief      Implementazione della classe \c RealNumber
 *  \author     Davide Scola <S2299453@studenti.unige.it>
 *  \author		Minetti Alberto <S3064777@studenti.unige.it>
 *  \version    1.0
 *
 */

#include <cmath>
#include "WrapNumber.cpp"
#include "RealNumber.hpp"


RealNumber::RealNumber( void ) : WrapNumber< long double >( )
{
}

RealNumber::RealNumber(const long double number) : WrapNumber< long double >( number )
{
}

RealNumber::RealNumber( const WrapNumber< long double >& other ) : WrapNumber< long double >( other )
{
}


/*!
 *  \brief      Operatore di uguaglianza della classe \c RealNumber
 *
 */
bool
RealNumber::operator==( const WrapNumber< long double >& other ) const
{
    if( fabs( this->number_ - (&other)->value() ) < REAL_NUMBER_PRECISION ) {
        return true;
    }
    
    return false;
}
